import request from '@/utils/request'

/**
 * 获取角色列表
 */
export const getRoleListAPI = () => {
  return request.get('/park/sys/role')
}

/**
 * 获取tree列表的数据
 */
export const getTreeListApi = () => {
  return request.get('/park/sys/permision/all/tree')
}

/**
 * 获取当前角色的权限点列表 --- 权限和分配的人数
 */
export const getTreeDatailApi = (roleId) => {
  return request.get(`/park/sys/role/${roleId}`)
}

/**
 * 获取与角色关联的用户列表
 */
export const getTreeDatailUserApi = (roleId) => {
  return request.get(`/park/sys/roleUser/${roleId}`)
}
